package com.hhs.storage.controller;


import com.alibaba.fastjson.annotation.JSONField;
import com.hhs.storage.bean.BaseDepartment;
import com.hhs.storage.bean.PersonConfigTitle;
import com.hhs.storage.bean.ResponseInfo;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.*;

import org.springframework.stereotype.Controller;


import com.hhs.storage.service.PersonConfigTitleService;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;

import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wc
 * @since 2024-05-15
 */
@RestController
@RequestMapping("/personConfigTitle")
public class PersonConfigTitleController {
    @Resource
    private PersonConfigTitleService personConfigTitleService;
    /**
     * 更新-个人计划未执行通知设置
     * @param userId
     * @param open
     * @param time
     * @return
     */
    @PostMapping("/editPersonPlanTitleConfig")
    public Map editPersonPlanTitleConfig(String userId, Boolean open, Integer time,@RequestParam(required = false, defaultValue = "") @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss") LocalDateTime nomtime, String planId){
        return personConfigTitleService.editPersonPlanTitleConfig(userId,open,time,nomtime,planId);
    }
    @RequestMapping("/isRead")
    public Map IsRead(String userId,Boolean open,Integer time,LocalDateTime nomtime,String planId,String read){
        return personConfigTitleService.IsRead(userId,open,time,nomtime,planId,read);
    }
    @RequestMapping("/isTime")
    public Map IsTime(){
        return personConfigTitleService.IsTime();
    }

    @RequestMapping("/isIgnore")
    public Map isIgnore(String planId){
        return personConfigTitleService.isIgnore(planId);
    }

}


